package com.polarrose.json.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.Collection;
import java.util.Map;

import com.polarrose.json.JsonDeserializer;

/**
 * Annotation added to setters or getters of JavaBean's property
 * that contains {@link Collection} or {@link Map}. It is used
 * to help JsonDeserializer determine the target type for deserialized
 * object.
 *
 * @see JsonDeserializer
 *
 * @author Piotr Maj
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface JsonHint {

	Class<?> className();

	/**
	 * KeyClassName is used to specify type of map's keys.
	 * It defaults to {@link String}.
	 * 
	 * @return
	 */
	Class<?> keyClassName() default String.class;
}
